/*************************************************************************
 *                  HONGLING CAPITAL CONFIDENTIAL AND PROPRIETARY
 *
 *                COPYRIGHT (C) HONGLING CAPITAL CORPORATION 2012
 *    ALL RIGHTS RESERVED BY HONGLING CAPITAL CORPORATION. THIS PROGRAM
 * MUST BE USED  SOLELY FOR THE PURPOSE FOR WHICH IT WAS FURNISHED BY
 * HONGLING CAPITAL CORPORATION. NO PART OF THIS PROGRAM MAY BE REPRODUCED
 * OR DISCLOSED TO OTHERS,IN ANY FORM, WITHOUT THE PRIOR WRITTEN
 * PERMISSION OF HONGLING CAPITAL CORPORATION. USE OF COPYRIGHT NOTICE
 DOES NOT EVIDENCE PUBLICATION OF THE PROGRAM.
 *                  HONGLING CAPITAL CONFIDENTIAL AND PROPRIETARY
 *************************************************************************/

package com.hongling.uc.service;

import com.hongling.uc.domain.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 定义服务接口，采用Feign+Ribbon的方式，动态负载均衡调用实现接口；
 *
 * @author hongchao zhao at 2019-7-23 15:43
 */
//这里的服务名不区分大小写，这里取消了熔断机制
@FeignClient(value = "uc-service",contextId = "demoService")
public interface DemoService {

    /**
     * 定义接口方法；
     *
     * @param name 用户名。
     * @return 返回接口数据；
     */
    @RequestMapping(value = "/sayHi",method = RequestMethod.GET)
    public String sayHi(@RequestParam(value = "name") String name);

    /**
     * 根据用户编号获取用户信息；
     * @param userID
     * @return
     */
    @RequestMapping(value = "/getUser",method = RequestMethod.GET)
    public UserDTO getUserById(@RequestParam(value = "id")Integer userID);

}
